Jaxson = new Class({
	options: {
		handlerURL: "/handlers/Jaxson/"
	}
	
	/**
	 * @param {obj} input POST Vars
	 * @return Query String
	 */
	pack: function(input){
		var Q= new Array();
		for ( X in input )
		Q.push(X+"="+input[X]);
		return Q.join('&');
	},

	/**
	 * @param {string} methodName The SSI Method you wish to post to ex Class.Method 
	 * @param {function} handler Function to handler response
	 * @param {object} params Post Parameters to send
	 */	
	call: function(methodName, handler, params)
	{
		if(!params) params={}
		params.method=methodName;
		var Q = this.pack(params);
		
		var X = new XHR({
			method: 'post',
			async:true,
			headers: {
				'Content-type':'application/x-www-form-urlencoded',
				'Content-length':Q.length,
				'Connection':'close'
			},
			onSuccess:function(response){
				var response = Json.evaluate(response);
				
				/**
				 * @todo Extend Error Handler
				 */
				if(response.error)
				alert(methodName + "() Error!!!\r\n\r\n" + response.error.title + "\r\n\r\n" + response.error.description);
				else
				handler(response);
				
			}
		}).send(this.options.handlerURL,Q);
	}	
});